package org.grapes.wine.api.client.rest;

import org.grapes.wine.api.client.method.proxy.ProxyWineMethod;
import org.grapes.wine.api.client.param.RestClientConfig;

public class GrapesRestClient extends ProxyWineMethod {

	protected String apiId;
	protected String sessionKey;
	protected String sig;
	protected String serverUrl;
	
	public GrapesRestClient(String apiId, String sessionKey, String sig) {
		this(apiId, sessionKey, sig, RestClientConfig.SERVER_ADDR);
	}

	public GrapesRestClient(String apiId, String sessionKey, String sig,
			String serverUrl) {
		super(apiId, sessionKey, serverUrl);
		this.sessionKey = sessionKey;
		this.apiId = apiId;
		this.sig = sig;
		this.serverUrl = (null != serverUrl) ? serverUrl
				: RestClientConfig.SERVER_ADDR;
	}

	public String getApiId() {
		return apiId;
	}

	public void setApiId(String apiId) {
		this.apiId = apiId;
	}

	public String getSessionKey() {
		return sessionKey;
	}

	public void setSessionKey(String key) {
		sessionKey = key;
	}

	public String getSig() {
		return sig;
	}

	public void setSig(String sig) {
		this.sig = sig;
	}

	public String getServerUrl() {
		return serverUrl;
	}

	public void setServerUrl(String serverUrl) {
		this.serverUrl = serverUrl;
	}

	public String getResponseFormat() {
		// default format value is "xml"
		return "xml";
	}
}
